var mongoose = require('mongoose')
mongoose.connect('mongodb://localhost/nodeuser')

var Schema=mongoose.Schema
var userSchema=new Schema({
    name:{type:String,required:true},
    password:{type:String,required:true},
    // -1男 1女
    gender:{type:Number,enum:[-1,0,1],default:-1}, 
    email:{type:String,required:true},
    avatar:{type:String,},
    date:{type:Date,default:Date.now},
    identity:{type:String,required:true}

})
module.exports=mongoose.model("User",userSchema)
// nodeuser库名字 User表名字User-->users

